package com.JustTest;


import org.springframework.beans.BeansException;
import org.springframework.beans.PropertyValues;
import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor;

import java.beans.PropertyDescriptor;

/**
 * Created by mike on 18/2/1.
 */
public class MyinstantiationAwareBeanPostProcessor implements InstantiationAwareBeanPostProcessor {
    public MyinstantiationAwareBeanPostProcessor() {
        super();
        System.out.println("no.4.........."+this.getClass().getName()+"-MyinstantiationAwareBeanPostProcessor");
    }

    @Override
    public Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws BeansException {
        System.out.println("no.5.........."+this.getClass().getName()+"-postProcessBeforeInstantiation");
        return null;
    }
    @Override
    public boolean postProcessAfterInstantiation(Object bean, String beanName) throws BeansException {
        System.out.println("no.x1.........."+this.getClass().getName()+"-postProcessAfterInstantiation");
        return true;
    }
    @Override
    public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws BeansException {
        System.out.println("no.7.........."+this.getClass().getName()+"-postProcessPropertyValues");
        return pvs;
    }

}
